package com.hm.ibsm.repositry;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.hm.common.def.DataStatusDef;
import com.hm.ibsm.domain.UserAuthTokenDomain;
import com.hm.ibsm.util.IbsmRepository;

/**
 * @author shishun.wang
 * @date 2017年2月9日 上午11:04:44
 * @version 1.0
 * @describe
 */
@Repository
public interface IUserAuthorTokenRepository extends IbsmRepository<UserAuthTokenDomain, String> {

	@Query("select u from UserAuthTokenDomain u where u.userId = :userId and u.status = :status")
	public UserAuthTokenDomain findUserAuthTokenByUserId(@Param("userId") String userId, @Param("status") DataStatusDef status);
}
